configure: Add buildtime check for cairo_surface_set_device_scale
authorAlexander Larsson <alexl@redhat.com>
Tue, 4 Jun 2013 08:39:32 +0000 (10:39 +0200)
committerAlexander Larsson <alexl@redhat.com>
Wed, 3 Jul 2013 12:34:13 +0000 (14:34 +0200)
We will need this for the window scale support, but its not yet
in a stable cairo release (or even on a master yet), so we make
this optional.

configure.ac

index 1bdbf1b70216e489d6c603f853ad96156651e228..6d825ba31edae9bac07a4b076b8ac46ffab30c1d 100644 (file)
@@ -1263,6 +1263,17 @@ else
         LIBS="$gtk_save_LIBS"
 fi
 
+# Check for cairo_set_device_scale, as we don't want to depend hard on
+# this until there is a stable release with it
+CAIRO_CFLAGS=`$PKG_CONFIG --cflags cairo`
+CAIRO_LIBS=`$PKG_CONFIG --libs cairo`
+CFLAGS="$CFLAGS $CAIRO_CFLAGS"
+gtk_save_LIBS="$LIBS"
+LIBS="$CAIRO_LIBS $LIBS"
+AC_CHECK_FUNCS(cairo_surface_set_device_scale)
+LIBS="$gtk_save_LIBS"
+
+
 CFLAGS="$saved_cflags"
 LDFLAGS="$saved_ldflags"